Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Create %Toniq.Job{} struct instead using a map #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oscarolbe
Copy link

The Job structure is used internally.
Invoking the methods of enqueue is the same way.

The only change would be in the struct result.

> Toniq.enqueue(TestWorker, [name: "Joe"])
%Toniq.Job {arguments: [name: "Joe"],
  error: nil, id: 7, options: nil, version: 1,
  vm: "2be749b8-5ae7-11e8-a08f-4c327598015b", worker: TestWorker}

instead of the map

> Toniq.enqueue(TestWorker, [name: "Joe"])
%{arguments: [name: "Joe"], id: 7, version: 1,
 vm: "2be749b8-5ae7-11e8-a08f-4c327598015b", worker: TestWorker}

Using this structure I will create an adapter for JobPersistance

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant