Jump to content

Recommended Posts

Posted

I need to write a lazy cron job that goes through a list of files and deletes those that are associated with expired sessions.

Our session information is stored in the DB table sessions.

Is there a Wire API call that allows me to do one of:

1) fetch all expired sessions?

2) hook the session expiration event?

3) fetch all active sessions?

4) do direct DB access to lookup sessions? (least preferred as I have to directly tie to session implmentation).

My logic can either flow:

Find active sessions

      delete files NOT in active sessions

Get files

       if session_id associated with file NOT in sessions (or has expired) delete file.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...