Giter Site home page Giter Site logo

zenaton / zenaton-ruby Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 1.0 272 KB

๐Ÿ’Ž Ruby gem to run and orchestrate background jobs with Zenaton Workflow Engine

Home Page: https://zenaton.com

License: MIT License

Ruby 99.96% Shell 0.04%
ruby workflow orchestration background-jobs queues workflow-engine job-orchestration queuing-system

zenaton-ruby's People

Contributors

idabmat avatar mryawe avatar pylebecq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zenaton-ruby's Issues

Use of `execute` method outside a workflow should thrown an exception

Expected behavior of execute method does make sense only within a workflow.

To be clear, the test should be that the method is used within a workflow - NOT that it is processed by an agent. So locally executing a workflow is still perfectly fine.

A specific Zenaton error should be thrown and documented.

Update documentation

There is one invalid @return value in the existing docs and some methods are undocumented (mostly from the refinements PR)

โžœ yard doc
[warn]: Invalid tag format for @return in file `lib/zenaton/traits/with_timestamp.rb` near line 28
Files:          36
Modules:        12 (    0 undocumented)
Classes:        36 (    0 undocumented)
Constants:      38 (    0 undocumented)
Attributes:      7 (    0 undocumented)
Methods:        67 (   13 undocumented)
 91.88% documented

Correct the behaviour of Event Subclasses in the Ruby Library

As known for some times, the when subclassing and Event class, the child Event is not handled properly by Zenaton changes has to be done, in coordination between the engine, agent and client libraries.

For more details please check:

zenaton/rfcs#19

Weekday and DayOfMonth methods should wait when the day provided is today

Expected Behavior:

per the discussion with @geomagilles:

if we are on Monday, 11am on the 23rd of the month. Then:

.Monday(1) should wait until next Monday at 11am
.Monday(1).At("9") should wait until next Monday at 9am
.Monday(1).At("13") should wait 2 hours only
.DayOfMonth(23) should wait for one month
.DayOfMonth(23).At("13") should wait for only 2 hours

Problem:

Currently, if today is a Monday, when calling Zenaton::Tasks::Wait.new.monday you don't actually wait until the next Monday, and the wait terminates immediately.

We have the same issue with the dayOfMonth method. If it's the 23rd and you call Zenaton::Tasks::Wait.new.day_of_month(23) you won't wait until the next month, but instead the wait will terminate immediately.

Specifically, I believe the two problematic lines are these:

now_dup += 1.month if now > now_dup

value.times { |_n| now_dup = now_dup.next_occurring(day) }

(note: I don't actually understand the ruby in the second link here, so I cannot confirm if the ruby library has the problem with weekdays that the other libraries do)

Fix:

See zenaton/zenaton-go#7 for the fix in the go library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.