Mild adjustments
This commit is contained in:
@@ -8,6 +8,8 @@ services:
|
|||||||
- "9042:9042"
|
- "9042:9042"
|
||||||
volumes:
|
volumes:
|
||||||
- cassandra:/var/lib/cassandra
|
- cassandra:/var/lib/cassandra
|
||||||
|
environment:
|
||||||
|
- MAX_HEAP_SIZE=2G
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
cassandra:
|
cassandra:
|
||||||
@@ -3,7 +3,7 @@ defmodule NeonVertigoService.MessageProcessor do
|
|||||||
|
|
||||||
import Ecto.Query, only: [from: 2]
|
import Ecto.Query, only: [from: 2]
|
||||||
|
|
||||||
def process_message(mqtt_pid, {"auctions", "create"}, payload, properties) do
|
def process_message(mqtt_pid, {"auctions", "created"}, payload, properties) do
|
||||||
changeset = Auction.changeset(%Auction{}, payload)
|
changeset = Auction.changeset(%Auction{}, payload)
|
||||||
reply = case Repo.insert(changeset) do
|
reply = case Repo.insert(changeset) do
|
||||||
{:ok, auction} ->
|
{:ok, auction} ->
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ defmodule NeonVertigoService.Mqtt.Server do
|
|||||||
{:ok, %MqttServer{}, {:continue, :post_init}}
|
{:ok, %MqttServer{}, {:continue, :post_init}}
|
||||||
end
|
end
|
||||||
|
|
||||||
# Callbacks
|
# == Callbacks ==
|
||||||
|
|
||||||
def handle_continue(:post_init, %MqttServer{} = state) do
|
def handle_continue(:post_init, %MqttServer{} = state) do
|
||||||
mqtt_config = Application.fetch_env!(:neon_vertigo_service, :mqtt_params)
|
mqtt_config = Application.fetch_env!(:neon_vertigo_service, :mqtt_params)
|
||||||
{:ok, mqtt_pid} = Supervisor.start_child(
|
{:ok, mqtt_pid} = Supervisor.start_child(
|
||||||
|
|||||||
Reference in New Issue
Block a user