Skip to content

Commit

Permalink
module definition spec made serializable #123
Browse files Browse the repository at this point in the history
  • Loading branch information
isuru89 committed Jul 31, 2022
1 parent 5789bf3 commit e86f4bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class ModuleDefinition implements Serializable {
private Specs specs;

@Data
public static class Specs {
public static class Specs implements Serializable {
private Map<String, Object> feeds;
private Map<String, Object> rules;

Expand Down
10 changes: 10 additions & 0 deletions docs/life-cycle-of-game.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Life Cycle of a Game

```mermaid
graph TD
A[CREATED] -->|start| B(STARTED)
B --> |pause| D[PAUSED]
B --> |stop| E[REMOVED]
D --> |stop| E
D --> |resume| B
```


### Starting a Game
1. Admin defines a new game in the admin API
1. This will cause to create a game record in admin db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public List<ModuleDefinition> listAllModuleDefinitions() {
.collect(Collectors.toList());
}

@Cacheable(value = ID.CACHE_MODULES, key = "moduleId")
@Cacheable(value = ID.CACHE_MODULES, key = "#p0")
@Override
public ModuleDefinition getModuleDefinition(String moduleId) {
return statsApiContext.getElementModules().stream()
Expand Down

0 comments on commit e86f4bd

Please sign in to comment.