This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import pymongo | |
| conn = pymongo.Connection('localhost', 27017) | |
| system = conn.dkp.systems.find_one() | |
| raids = list(conn.dkp.raids.find({'system_id': system['_id']})) | |
| del raids | |
| # no matter how much time passes, the RAM is not being reclaimed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import pymongo | |
| import gc | |
| conn = pymongo.Connection('localhost', 27017) | |
| system = conn.dkp.systems.find_one() | |
| for raid in conn.dkp.raids.find({'system_id': system['_id']}): | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Snowflake do | |
| use Application | |
| def start(_type, _args) do | |
| import Supervisor.Spec | |
| children = [ | |
| worker(:riak_core_vnode_master, [Snowflake.VNode]), | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "os" | |
| "os/exec" | |
| "os/signal" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def handle_call({:publish, message}, _from, %{sessions: sessions}=state) do | |
| Enum.each(sessions, &send(&1.pid, message)) | |
| {:reply, :ok, state} | |
| end |
OlderNewer