Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing workflow/task with priority #51

Open
shrimank opened this issue Jul 30, 2019 · 2 comments
Open

Testing workflow/task with priority #51

shrimank opened this issue Jul 30, 2019 · 2 comments

Comments

@shrimank
Copy link

shrimank commented Jul 30, 2019

In the latest code of netflix conductor added support for priority for workflow.
Need to understand how priority works with workflow/tasks when startWorkflow invoked.

I have tested with simple workflow, just calling an http task.
submitting 3 workflows with different priority, but the conductor server executing those workflows in order of submission(since you are scheduling the workflow for later some time).

#Few More details:
**I have followed below steps to check the priority testing:
1.Registered Task
2.Registered Workflow(SIMPLE)
3.Created Worker and started polling the registered the tasks.

Then, submitted 5 curl request to start the workflow with different priority(0-99) (used endpoint which accepts priority in query param),.
But the worker is polling the task & getting in the order of submission.

[
What are you doing here in the class RedisDynoQueue.class method public List push(final List messages) with priority how it set the priority to the message here.

double priority = message.getPriority() / 100.0;
double score = Long.valueOf(clock.millis() + message.getTimeout()).doubleValue() + priority;
String shard = shardingStrategy.getNextShard(allShards, message);
String queueShard = getQueueShardKey(queueName, shard);
quorumConn.zadd(queueShard, score, message.getId());

]

Please need your help to understand and implement the priority with workflow.

(Netflix/conductor#1224)

@andrasfe
Copy link

any updates on this item? I am also looking at the same code and cannot figure out how message priorities are being leveraged

@bearbearkeeper
Copy link

maybe need make score to double looks like priority.[clock.millis() + message.getTimeout()]

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

No branches or pull requests

3 participants