-
Notifications
You must be signed in to change notification settings - Fork 0
4am redis storage
chatelardbastien edited this page Sep 26, 2012
·
2 revisions
- A command is an JSON serialised object stored in redis, the id of the command is composed by:
'cmd-#{type}:#{entity id}:#{cmd id}'
type : 'group' or 'host' it is the type of the entity where the command need to be executed
entity id : is the id representing the host or group in the database
cmd id : is the id representing the command * to get an available id for the command, we use '#{type}-#{entity id}:max' this key store the max id for each host/group. (dont forget to increment it).
- All commands are emited to '4am-command' channel, it's a publish subscribe redis component
- when publishing a command, we publish the id of the command