Skip to content

huxinghai/sidekiq-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sidekiq-client

sidekiq queue client that supports the Java language.

maven install

<dependency>
  <groupId>com.github.huxinghai1988</groupId>
  <artifactId>sidekiq-client-plugin</artifactId>
  <version>1.5.2</version>
</dependency>

Example usage

ClientImpl client = new ClientImpl("namespace", new Jedis("localhost"));

Worker worker = new Worker("TestWorker", new Object[]{ "arg1" , "arg1", Arrays.asList("inner", 4.5) }).withQueue("notify");
client.enqueue(worker);


//add schedule
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd H:m:s");
Date d = formatter.parse("2015-04-25 22:19:00");

ClientImpl client = new ClientImpl("namespace", new Jedis("localhost"));

Worker worker = new Worker("TestWorker", new Object[]{ "arg1" , "arg1", "arg2" }).withQueue("notify").withEnqueuedAt(d.getTime());
client.enqueue(worker);


//delete scheduled
client.delete(jid)

About

java sidekiq client

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages