Skip to content

Delete job functionality #48

Description

@francislavoie

So, we have a default expiry for jobs, but I have a use-case where I want to get rid of data as quick as possible for security reasons. I want to handle sensitive data with jobs but once it's processed I want to get rid of the payload as quickly as possible.

We have this issue #34 which kinda ties into this a bit.

I propose two options:

  • add a delete() function to Job.php which would have the job delete itself from redis, something like $this->redis->del(self::redisKey($this));
  • add a setExpiry(int seconds) function to Job.php which can manually set the expiry time. This could indirectly be used to delete things by setting the seconds to 0 I think. e.g. $this->redis->expire(self::redisKey($this), seconds); (we'd need to validate the inputs here), in addition this function could replace this usage of $this->redis->expire in Job.php

I think both are good options, we could implement them both. They cover different use-cases.

Thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions